<?php echo $this->Session->flash(); ?>
<div  id="loadst" style="display: none;">
    <?php echo $html->image('loading.gif', array('border' => "0", 'align' => 'center')); ?>
</div>
<h1>109. ACTIVIDAD PECUARIA</h1>
<fieldset>

    <table border="1">
        <thead>

            <tr>
                <td>TIPO</td>
                <td>TIPO OTRO</td>
                <td>ÁREA EXPLOTADA</td>
                <td>TIPO EXPLOTACÓN</td>
                <td>TIPO EXPLOTACÓN OTRO</td>
                <td>NÚMERO HEMBRAS</td>
                <td>NÚMERO MACHOS </td>
                <td>NÚMERO CRIAS</td>
                <td>SITIO DE VENTA</td>
                <td>A QUIÉN VENDE</td>
                <td colspan="2"></td>
            </tr>

        </thead>
        <tbody>
            <?php foreach ($activities as $ac): ?>

                <tr>
                    <td><?php echo $ac['Livestock']['tipo']; ?></td>
                    <td><?php echo $ac['Livestock']['otro_tipo']; ?></td>
                    <td><?php echo $ac['Livestock']['area_explotada']; ?></td>
                    <td><?php echo $ac['Livestock']['tipo_explotacion']; ?></td>
                    <td><?php echo $ac['Livestock']['explotacion_otro']; ?></td>
                    <td><?php echo $ac['Livestock']['numero_hembras']; ?></td>
                    <td><?php echo $ac['Livestock']['numero_machos']; ?></td>
                    <td><?php echo $ac['Livestock']['numero_crias']; ?></td>
                    <td><?php echo $ac['Livestock']['sitio_venta']; ?></td>
                    <td><?php echo $ac['Livestock']['comprador']; ?></td>
                    <td><?php
            if ($usuario['User']['group_id'] != 5 && $usuario['User']['group_id'] != 6 && $visto_bueno['Poll']['visto_bueno'] != 'Si') {
                echo $ajax->link("Editar", array('controller' => 'Livestocks', "action" => "edit", $ac['Livestock']['id']), array('update' => 'livestocks', 'indicator' => 'loadst'));
            }
                ?></td>
                    <td><?php
                    if ($usuario['User']['group_id'] != 5 && $usuario['User']['group_id'] != 6 && $visto_bueno['Poll']['visto_bueno'] != 'Si') {
                        echo $ajax->link("Eliminar", array('controller' => 'Livestocks', "action" => "delete", $ac['Livestock']['id'], $this->data['Livestock']['poll_id']), array('update' => 'livestocks', 'indicator' => 'loadst'), '¿Desea Eliminar El Registro?');
                    }
                ?></td>

                </tr>

            <?php endforeach; ?>
        </tbody>
    </table>
    <?php
    if ($usuario['User']['group_id'] != 5 && $usuario['User']['group_id'] != 6 && $visto_bueno['Poll']['visto_bueno'] != 'Si') {
        echo $ajax->link("Adicionar", array('controller' => 'Livestocks', "action" => "add", $this->data['Livestock']['poll_id']), array('update' => 'livestocks', 'indicator' => 'loadst'));
    }
     ?>
</fieldset>
